﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SdlDotNet.Graphics;
using Point = System.Drawing.Point;

namespace Pokemon
{
    [Flags]
    public enum TileFlags
    {
        Solid = 0x01,
        Ramp = 0x02,
        Ledge = 0x04,
        Warp = 0x08,
        Hurl = 0x10,
        Stop = 0x20,
        Trap = 0x40,
        Animation = 0x80,
        Grass = 0x100,
        Sand = 0x200,
        Ice = 0x400,
        Water = 0x800,
    }

    [Flags]
    public enum TileLevels
    {
        North = 0x01,
        East = 0x02,
        South = 0x04,
        West = 0x08,
        Level1 = 0x10,
        Level2 = 0x20,
    }

    class Tile
    {
        public Surface Image;
        public List<Atom> Content;
        public TileFlags Flags;
        public TileLevels FlagLevel;
        public Map Loc;
        public int Warp;
        public int Animation;
        public string Name;

        public void Draw(int ox, int oy)
        {
            Global.MainSurface.Blit(Image, new Point(ox,oy));

            foreach (Atom a in Content)
            {
                a.Draw(ox,oy);
            }
        }

        public Tile Copy() //TODO
        {
            Tile rTile = new Tile();

            return rTile;
        }
    }
}
